Compiler Optimizations in Reform Prolog: Experiments on the KSR-1 Multiprocessor
نویسندگان
چکیده
We describe the compiler analyses of Reform Prolog and evaluate their eeectiveness in eliminating suspension and locking on a range of benchmarks. The results of the analysis may also be used to extract non-strict independent and-parallelism. We nd that 90% of the predicate arguments are ground or local, and that 95% of the predicate arguments do not require suspension code. Hence, very few suspension operations need to be generated to maintain sequential semantics. The compiler can also remove unnecessary locking of local data by locking only updates to shared data; however, even though locking writes are reduced to 52% of the unoptimized number for our benchmark set, this has little eeect on execution times. We nd that the ineeectiveness of locking elimination is due to the relative rarity of locking writes, and the execution model of Reform Prolog, which results in few invalidations of shared cache lines when such writes occur. The benchmarks are evaluated on a cache-coherent KSR-1 multiprocessor with physically distributed memory, using up to 48 processors. Speedups scale from previous results on smaller, bus-based multiprocessors, and previous low parallelization overheads are retained.
منابع مشابه
Determinacy Driven Optimizations of And-Parallel Prolog Implementations
And-parallelism arises in Prolog programs when conjunctive subgoals in a query or the body of a clause are executed in parallel. In this paper we present three optimizations, namely, the last parallel call optimization, the shallow parallelism optimization, and the processor determinacy optimization that take advantage of determinacy to improve eeciency of and-parallel execution of Prolog progr...
متن کاملThe Effect of Compiler Optimizations on Available Parallelism in Scalar Programs
In this paper we analyze the e ect of compiler optimizations on ne grain parallelism in scalar programs. We characterize three levels of optimization: classical, superscalar, and multiprocessor. We show that classical optimizations not only improve a program's e ciency but also its parallelism. Superscalar optimizations further improve the parallelism for moderately parallel machines. For highl...
متن کاملReform Prolog: The Language and Its Implementation
Reform Prolog is an (dependent) AND-parallel system based on recursion-parallelism and Reform compilation. The system supports selective, user-declared, parallelization of binding-deterministic Prolog programs (nondeter-minism local to each parallel process is allowed). The implementation extends a convential Prolog machine with support for data sharing and process managment. Extensive global d...
متن کاملAnalysis and Optimization of CHR Programs
Introduction. Constraint Handling Rules (CHR) [2] is a high-level, powerful, yet relatively simple “no box” CLP language, embedded in a host language, commonly Prolog. It is based on multi-headed committed-choice rules. Recent implementations of CHR consist of a compiler which translates a CHR program to host language code, and a run-time system implementing the constraint store. Originally, CH...
متن کاملWAMCC: Compiling Prolog to C
We present the wamcc system, a Prolog compiler that translates Prolog to C via the WAM. This approach has some interesting consequences: simplicity, efficiency, portability, extensibility and modularity. Indeed the system does not incorporate complex optimizations but is as efficient as Quintus Prolog 2.5 (based on an emulator written in assembly language) and only 30 % slower than Sicstus Prol...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995